'use strict';

stareal
    .controller("ViewListController", function ($scope, $stateParams, $api, $sce, base64, $state, $alert,localStorageService) {
        $scope.mypage = 2;
        var h=$(window).height()-1.5*parseFloat(document.documentElement.style.fontSize)+"px";
        $("#wrapper_container").height(h);
        // 分类选择
        $api.get("app/view/classifylist",{}, true)
            .then(function(ret){
                $scope.classifylists = ret.data;
            })
       $scope.classView=function(){
           //获取分类的列表信息
           $api.get("app/view/classifylistid",{flag:1}, true)
               .then(function(ret){
                   $scope.viewClassinfos = ret.data;
               })
       }
        //埋点
        $scope.maiDian=function(type,action,label,id){
            if(_czc!=undefined&&_czc!=null&&_czc!='') {
                _czc.push(["_trackEvent", type, action, label, '', id]);
            }
        }
        $scope.classView();
    });